<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Ingreso Administración Solicitudes</title>
    </h:head>
    <h:body>
        <ui:composition template="template.xhtml">
            <ui:define name="content">
                <h:form>
                    <center>
                        <rich:panel header="Restablecer Contraseña" style="width: 225px">
                            <h:outputText value="Usuario: "/>
                            <h:inputText id="usuario" value="#{restablecerBean.usuario}"/>
                            <br/>
                            <a4j:commandButton id="restablecerButton" value="Restablecer Contraseña" 
                                               actionListener="#{restablecerBean.restablecerContrasena}" render="informacionPopup" 
                                               oncomplete="#{rich:component('informacionPopup')}.show();return false"/>
                            <h:commandButton value="Volver" action="login.xhtml?faces-redirect=true"/>
                        </rich:panel>
                    </center>
                </h:form>
                <rich:popupPanel id="informacionPopup" width="250" height="150">
                    <f:facet name="header">Información</f:facet>
                    <h:panelGrid>
                        <h:panelGrid columns="2">
                            <h:outputText value="#{restablecerBean.mensaje}" style="FONT-SIZE: small;" />
                        </h:panelGrid>
                        <h:panelGroup>
                            <input type="button" value="OK"
                                   onclick="#{rich:component('informacionPopup')}.hide();
                                           submit();
                                           return false;" />
                        </h:panelGroup>
                    </h:panelGrid>
                </rich:popupPanel>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
